Variable length coding method and variable length decoding method

ABSTRACT

A variable length coding method is comprised of: a coefficient value scanning step in which an RL sequence generation unit, a reordering unit, and a binarization unit scan coefficient values within a block in a predetermined scanning order starting at a higher-frequency component toward a lower-frequency component; and an arithmetic coding step in which an arithmetic coding unit and a table storage unit perform arithmetic coding on the absolute values of the coefficient values according to the scanning order used in the coefficient value scanning step, by switching between probability tables for use, wherein, in the arithmetic coding step, a probability table to be used is switched to another probability table in one direction, when the arithmetic-coded absolute values of the coefficient values include an absolute value exceeding a predetermined threshold value.

CROSS REFERENCE TO RELATED APPLICATIONS

This is a continuation of application Ser. No. 14/324,749, filed Jul. 7,2014, which is a divisional of application Ser. No. 13/603,821, filedSep. 5, 2012, now U.S. Pat. No. 8,804,838, which is a divisional ofapplication Ser. No. 13/159,827, filed Jun. 14, 2011, now U.S. Pat. No.8,284,841, which is a divisional of application Ser. No. 12/710,673,filed Feb. 23, 2010, now U.S. Pat. No. 8,005,146, which is a divisionalof application Ser. No. 10/481,277, now U.S. Pat. No. 7,742,528, whichis the National Stage of International Application No. PCT/JP03/04804,filed Apr. 16, 2003. The entire disclosures of the above-identifiedapplications, including the specifications, drawings and claims areincorporated herein by reference in their entirety.

TECHNICAL FIELD

The present invention relates to coding and decoding of picture data,and more particularly to a method of performing arithmetic coding andarithmetic decoding on coefficient values of picture data.

BACKGROUND ART

In moving picture coding processing, information is generally compressedutilizing spatial and temporal redundancy included in a moving picture.Usually, transformation into the frequency domain is used as a method ofutilizing spatial redundancy, while inter picture prediction coding isused as a method of utilizing temporal redundancy.

In the H.263 moving picture coding method, a mode using arithmeticcoding is employed as a variable length coding method (For example,refer to “ITU-T Recommendation H.263: “Video Coding for Low Bit RateCommunication” (1998), Annex E”).

In such variable length coding method, frequency transformation isperformed on each block sized 4×4 pixels, and quantization is furtherperformed on such block to generate coefficient values. Then, scanningis performed starting at a high frequency component toward lowerfrequency components (direct current components), and combinations of anumber R indicating a run of “zeros” and a coefficient value Lsubsequent to it are generated. Subsequently, after converting(binarizing) numbers R, the absolute values of coefficient values L, andthe signs of the coefficient values L into binary data made up of “0”sand “1”s by the use of a binary table, binary arithmetic coding isperformed on such binary data by switching between a plurality ofprobability tables for use. A table shown in FIG. 1 is used, forexample, as a binary table for the absolute values of the coefficientvalues L.

FIG. 1 is a table diagram showing an example binary table.

When binarization is performed on the absolute value “2” of acoefficient value L using the binary table shown in FIG. 1, for example,such absolute value is converted into binary data “01”. Also, whenperforming binarization on the absolute value “3” of a coefficient valueL, such absolute value is converted into binary data “001”.

When arithmetic coding is performed on binary data derived from theabsolute value of a coefficient value L, a probability table is switchedto another one based on a transition diagram shown in FIG. 2, dependingon the absolute value of the previous coefficient value L.

FIG. 2 is a transition diagram showing a method of switching betweenprobability tables according to an existing technique.

First, arithmetic coding is performed on the absolute value of the firstcoefficient value L, using a probability table 1. For the subsequentcoefficient values L, a probability table is switched to another onedepending on the previous coefficient value L of each of suchcoefficient values L. More specifically, a probability table 2 is usedwhen the absolute value of the previous coefficient value L is 1, aprobability table 3 is used when the absolute value of the previouscoefficient value L is 2, and a probability table 4 is used when theabsolute value of the previous coefficient value L is 3 or a largervalue.

In this case, a determination on a probability table depends entirely onthe absolute value of the previous coefficient value L.

Also, each of the probability tables itself is updated depending onwhether binary data inputted is “0” or “1”. In this case, each update isperformed in a manner in which the probability of “0” is increased wheninput binary data is “0” and the probability of “1” is increased wheninput binary data is “1”. Accordingly, adaptations are made on theprobability tables so that they will suit the frequency at which binarydata is inputted.

In the above existing technique, a probability table is switched toanother one depending on the absolute value of the previous coefficientvalue L. Generally, the absolute values of coefficients on whichfrequency transformation has been performed tend to be larger in thedirection from higher frequency components toward lower frequencycomponents. Thus, there is a problem with the use of the aforementionedexisting technique that the switching of a probability table cannotsupport an increase trend of coefficients in a case where the absolutevalue of a certain coefficient is smaller than that of the previouscoefficient, leading to reduced coding efficiency.

In view of the above problem, it is an object of the present inventionto provide a variable length coding method and a variable lengthdecoding method that provide an increased coding efficiency at the timeof performing picture coding.

DISCLOSURE OF INVENTION

In order to achieve the above object, the variable length coding methodaccording to the present invention is a variable length coding methodfor coding absolute values of coefficient values within each of blockswith a predetermined size in picture data on which frequencytransformation has been performed on said each of the blocks, thevariable length coding method comprising: a coefficient value scanningstep of scanning the absolute values of the coefficient values withineach of the blocks in a predetermined scanning order starting at ahigher-frequency component toward a lower-frequency component; and anarithmetic coding step of performing arithmetic coding on the absolutevalues of the coefficient values according to the scanning order used inthe coefficient value scanning step, by switching between a plurality ofprobability tables for use, wherein, in the arithmetic coding step, aprobability table to be used is switched to another probability table inone direction, when the arithmetic-coded absolute values of thecoefficient values include an absolute value exceeding a predeterminedthreshold value.

Generally, the absolute values of coefficient values are larger towardlower frequency components. Therefore, when scanning is applied to thehigh-frequency domain and then to the low-frequency domain, it is likelythat the absolute values of the coefficient values become larger in suchorder. Thus, as described above, in the variable length coding methodaccording to the present invention, a probability table to be used isswitched to another one in one direction when there exists, in thearithmetic-coded coefficient values, an absolute value that exceeds apredetermined coefficient value. From then on, even if the absolutevalue of a coefficient value becomes smaller than such predeterminedthreshold value, such coefficient value will be arithmetic-coded withoutswitching a probability table to be used in the opposite direction.Through this operation, update of a probability table becomes moreeasily adaptive to inputs of coefficient values whose absolute valuesgenerally tend to be larger in the direction from higher-frequencycomponents toward lower-frequency components. This consequently makes itpossible for the occurrence probability of symbols (“0” or “1” in binarydata) in each probability table to be more biased (i.e. the occurrenceprobability of either “0” or “1” becomes a value closer to 1.0).Arithmetic coding has a characteristic that the more biased probabilityvalues in a probability table are, the higher the coding efficiencybecomes. Accordingly, the use of the variable length coding methodaccording to the present invention results in an improved codingefficiency.

Also, the variable length decoding method according to the presentinvention is a variable length decoding method for decoding a bit streamwhich is generated by coding absolute values of coefficient valueswithin each of blocks with a predetermined size in picture data on whichfrequency transformation has been performed on said each of the blocksafter one-dimensionalizing said absolute values, the variable lengthdecoding method comprising: an arithmetic decoding step of arithmeticdecoding the bit stream into absolute values of a plurality ofcoefficient values on a one-by-one basis, by switching between aplurality of probability tables for use; and a coefficient generationstep of converting the absolute values of the coefficient values decodedin the arithmetic decoding step into the absolute values of thecoefficient values within each of the blocks, according to apredetermined scanning order starting at a higher-frequency componenttoward a lower-frequency component, wherein, in the arithmetic decodingstep, a probability table to be used is switched to another probabilitytable in one direction, when the arithmetic-decoded absolute values ofthe coefficient values include an absolute value exceeding apredetermined threshold value.

Accordingly, it becomes possible to properly decode a bit stream codedby the use of the variable length coding method according to the presentinvention.

Note that the present invention can be realized not only as a variablelength coding method and a variable length decoding method as describedabove, but also as a variable length coding apparatus and a variablelength decoding apparatus that have, as their steps, the characteristicsteps included in the above variable length coding method and variablelength decoding method, and realized as a picture coding apparatus and apicture decoding apparatus for coding and decoding a moving picturebeing equipped with the above apparatuses, as well as being realized asa program that causes a computer to execute such characteristic steps.And it should be noted that such program can be distributed viarecording media including CD-ROM and the like, and transmission mediaincluding the Internet and the like.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a table diagram showing an example binary table.

FIG. 2 is a transition diagram showing a method of switching betweenprobability tables according to an existing technique.

FIG. 3 is a block diagram showing a configuration of a picture codingapparatus according to a first embodiment of the present invention.

FIG. 4 is a block diagram showing an internal configuration of avariable length coding unit according to the first embodiment of thepresent invention.

FIG. 5A and FIG. 5B are schematic diagrams schematically showingcoefficient blocks outputted by a quantization unit according to thefirst embodiment of the present invention.

FIG. 6A, FIG. 6B, and FIG. 6C are schematic diagrams schematicallyshowing RL sequences outputted by an RL sequence generation unitaccording to the first embodiment of the present invention.

FIG. 7 is a transition diagram showing a method of switching betweenprobability tables according to the first embodiment of the presentinvention.

FIG. 8 is a probability table contents diagram showing the contents of aprobability table according to the first embodiment of the presentinvention.

FIG. 9 is a transition diagram showing a method of switching between theprobability tables employed by an arithmetic coding unit according avariation of the present invention.

FIG. 10 is an explanation diagram explaining a case where the arithmeticcoding unit according to the variation of the present invention uses twoprobability tables for the absolute value of each coefficient value.

FIG. 11 is a block diagram showing a configuration of a picture decodingapparatus according to a second embodiment of the present invention.

FIG. 12 is a block diagram showing an internal configuration of avariable length decoding unit according to the second embodiment of thepresent invention.

FIG. 13A, FIG. 13B, and FIG. 13C are explanation diagrams showing arecording medium according to a third embodiment of the presentinvention.

FIG. 14 is a block diagram showing an overall configuration of a contentsupply system according to a fourth embodiment of the present invention.

FIG. 15 is a front view of a cellular phone according to the fourthembodiment of the present invention.

FIG. 16 is a block diagram showing the cellular phone according to thefourth embodiment of the present invention.

FIG. 17 is a block diagram showing an overall configuration of a digitalbroadcasting system according to the fourth embodiment of the presentinvention.

BEST MODE FOR CARRYING OUT THE INVENTION

(First Embodiment)

The following explains a picture coding apparatus according to the firstembodiment of the present invention with reference to the figures.

FIG. 3 is a block diagram showing the configuration of a picture codingapparatus 100 according to the first embodiment of the presentinvention.

This picture coding apparatus 100, which performs intra picture codingon an input picture (picture data) with improved coding efficiency, iscomprised of a block conversion unit 101, a frequency transformationunit 102, a quantization unit 103, and a variable length coding unit104.

The block conversion unit 101 divides an input picture into pixel blockswith a size of 4×4 pixels in horizontal and vertical directions, andoutputs them to the frequency transformation unit 102.

The frequency transformation unit 102 performs frequency transformationon each of the above-divided pixel blocks so as to generate frequencycoefficients. Then, the frequency transformation unit 102 outputs suchgenerated frequency coefficients to the quantization unit 103.

The quantization unit 103 performs quantization on the frequencycoefficients outputted by the frequency transformation unit 102.Quantization here means processing equivalent to dividing a frequencycoefficient by a predetermined quantization value. Moreover, aquantization value varies depending generally on a pixel block and afrequency band. Subsequently, the quantization unit 103 outputs thequantized frequency coefficients to the variable length coding unit 104.

The variable length coding unit 104 performs variable length coding onthe frequency coefficients quantized by the quantization unit 103.

FIG. 4 is a block diagram showing an internal configuration of thevariable length coding unit 104.

As shown in FIG. 4, the variable length coding unit 104 is made up of anRL sequence generation unit 201, a reordering unit 202, a binarizationunit 203, a table storage unit 204, and an arithmetic coding unit 205.

The RL sequence generation unit 201 converts the quantized frequencycoefficients (to be abbreviated as “coefficients” hereinafter) outputtedby the quantization unit 103 into one-dimensional coefficients, using apredetermined scanning method. Then, the RL sequence generation unit 201generates a sequence (to be referred to as “RL sequence” hereinafter)made up of combinations of a number R indicating a run of “zero”coefficients and the subsequent coefficient value L indicating anon-“zero” coefficient (to be referred to as “RL values” hereinafter).Referring to FIGS. 5 and 6, an example of this is explained.

FIG. 5A shows a coefficient block made up of a plurality of coefficientsoutputted by the quantization unit 103. Here, the upper left frequencycoefficient denotes a direct-current component, and frequency componentsin the horizontal direction become larger toward right, while frequencycomponents in the vertical direction become larger downward.

FIG. 5B is an explanation diagram for explaining a scanning method forone-dimensionalizing a plurality of coefficients within a coefficientblock. As indicated by arrows in FIG. 5B, the RL sequence generationunit 201 one-dimensionalizes coefficients by performing scanning withinthe coefficient block starting from the low-frequency domain toward thehigh-frequency domain.

FIG. 6A shows an RL sequence outputted by the RL sequence generationunit 201. In FIG. 6A, the first number indicates the number ofcoefficients. Generally, a coefficient value is more likely to be “0” inthe high-frequency domain. Therefore, by performing scanning startingfrom the low-frequency domain toward the high-frequency domain, it ispossible to reduce the amount of information included in an RL sequence(of which, the amount of information of the numbers R). The generated RLsequence is inputted to the reordering unit 202.

The reordering unit 202 sorts the inputted RL sequence in reverse order.However, the number of coefficients shall not be reordered.

FIG. 6B shows the RL sequence reordered by the reordering unit 202. Byperforming reordering in this way, it is possible to reduce the amountof information just as described above, and consequently toone-dimensionalize coefficients by applying scanning to the coefficientblock from the high-frequency domain toward the low-frequency domain.Subsequently, the RL sequence reordered in the above manner is outputtedto the binarization unit 203.

The binarization unit 203 performs binarization on the number ofcoefficients and each RL value, i.e. converts them into binary data madeup of “0”s and “1”s. Here, the numbers R and coefficient values L arebinarized separately.

FIG. 6C shows only the coefficient values L in the RL sequence reorderedby the reordering unit 202. The absolute values and signs of thesecoefficient values L are separately processed. Moreover, thebinarization unit 203 performs binarization on the numbers R and theabsolute values of the coefficient values L, using a predeterminedbinary table as shown in FIG. 1, for example. Then, the binarizationunit 203 outputs, to the arithmetic coding unit 205, binary dataresulted from performing binarization on them.

The arithmetic coding unit 205 performs binary arithmetic coding on thenumbers R and the absolute values of the coefficient values Lrepresented as binary data, while at the same time coding the signs ofthe coefficient values L. An explanation is given here of arithmeticcoding to be performed on the absolute value of a coefficient value L.The arithmetic coding unit 205 uses a plurality of probability tables byswitching between them, when performing arithmetic coding on theabsolute value of a coefficient value L represented as binary data. Suchplurality of probability tables are stored by the table storage unit204.

FIG. 7 is a transition diagram showing a method of switching betweenprobability tables.

As FIG. 7 shows, the arithmetic coding unit 205 uses four probabilitytables, out of which the probability table 1 is used to performarithmetic coding on the absolute value of the first coefficient valueL. Meanwhile, for a subsequent coefficient value L, the arithmeticcoding unit 205 switches to another probability table for use, dependingon the table number of a probability table used for coding the absolutevalue of the previous coefficient value L as well as on such absolutevalue. Here, four probability tables are the probability table 1, theprobability table 2, the probability table 3, and the probability table4, and the table number of the probability table 1 is “1”, the tablenumber of the probability table 2 is “2”, the table number of theprobability table 3 is “3”, and the table number of the probabilitytable 4 is “4”.

More specifically, the probability table 2 is used when one of thefollowing is satisfied: when the probability table 1 is used to code theabsolute value of the previous coefficient value L and its absolutevalue is “1”; and when the probability table 2 is used to code theabsolute value of the previous coefficient value L and its absolutevalue is “1”. Meanwhile, the probability table 3 is used when one of thefollowing is satisfied: when the probability table 1 is used to code theabsolute value of the previous coefficient value L and its absolutevalue is “2”; when the probability table 2 is used to code the absolutevalue of the previous coefficient value L and its absolute value is “2”;and when the probability table 3 is used to code the absolute value ofthe previous coefficient value L and its absolute value is “2 orsmaller”. And, the probability table 4 is used when one of the followingis satisfied: when the absolute value of the previous coefficient valueL is “3 or a larger value”; and when the probability table 4 is used tocode the absolute value of the previous coefficient value L.

As described above, the probability tables are switched in onedirection, that is, from a probability table with a smaller table numberto a probability table with a larger table number. Accordingly, evenwhen the absolute value of the previous coefficient value L is equal toor smaller than a predetermined threshold value, the probability tablesshall not be switched in the opposite direction. This is the point thatdistinguishes the present invention from the existing technique.

FIG. 8 is a probability table contents diagram showing the contents ofthe aforementioned four tables 1˜4.

As shown in FIG. 8, each of the four probability tables 1˜4 is made upof the probability with which “0” occurs and the probability with which“1” occurs.

For example, the probability table 1 is made up of the probability “0.1”with which “0” occurs and the probability “0.9” with which “1” occurs,and the probability table 2 is made up of the probability “0.2” withwhich “0” occurs and the probability “0.8” with which “1” occurs.

To put it another way, when the absolute value of a coefficient value Lis “2”, the result of binarizing “2” is “01”, and therefore, when usingthe probability table 1 to perform arithmetic coding on “01”, thearithmetic coding unit 205 performs arithmetic coding on “01” using theprobability “0.1” corresponding to “0” in such “01” and the probability“0.9” corresponding to “1” in such “01”.

Here, since the sum of the probability with which “0” occurs and theprobability with which “1” occurs is 1.0, it is not necessary to holdboth of these probabilities, and therefore only either of theprobabilities may be retained.

The following explains an example method of switching betweenprobability tables in a case where coding is performed on the absolutevalues (binarized ones) of the coefficient values L shown in FIG. 6C.

The arithmetic coding unit 205 uses the probability table 1 for theabsolute value of the first coefficient value L (−2). Here, since theabsolute value of such coefficient value L is 2, the arithmetic codingunit 205 switches the probability table 1 to the probability table 3 foruse. Accordingly, the arithmetic coding unit 205 uses the probabilitytable 3 to perform arithmetic coding on the absolute value of the secondcoefficient value L (3). Here, since the absolute value of suchcoefficient value L is “3”, the arithmetic coding unit 205 switches theprobability table 3 to the probability table 4 for use. Accordingly, thearithmetic coding unit 205 uses the probability table 4 to performarithmetic coding on the absolute value of the third coefficient value L(6). Here, since the probability table to be used has been switched tothe probability table 4, the arithmetic coding unit 205 uses theprobability table 4 to perform arithmetic coding on the absolute valuesof all subsequent coefficient values L. For example, the absolute valueof the fifth coefficient value L is “2”, but unlike the existingtechnique, the arithmetic coding unit 205 uses the probability table 4when performing arithmetic coding on the absolute value of the sixthcoefficient value L and thereafter, without switching to anotherprobability table.

Furthermore, since each of the probability tables are updated as neededdepending on whether an input is “0” or “1”, such probability tables areupdated to adapt to inputs.

As described above, in the variable length coding method employed by thevariable length coding unit 104 in the picture coding apparatus 100according to the present invention, one-dimensionalization is performedon coefficients within a coefficient block by scanning them startingfrom the low-frequency domain toward the high-frequency domain. Then, itgenerates a sequence of RL values (RL sequence) made up of combinationsof a number R indicating a run of “zero” coefficient values and anon-“zero” coefficient value L subsequent to it. Such RL values are thenconverted into variable length codes in an order opposite to the one inwhich the scanning has been applied. When the RL values are convertedinto variable length codes, numbers R, the absolute values ofcoefficient values L and the signs of the coefficient values L areconverted separately. When they are converted, binarization is performedfirst, which is followed by arithmetic coding. In order to performarithmetic coding on the absolute values of the coefficient values L, aplurality of probability tables are switched between them. When aprobability table is switched to another probability table, aprobability table to be used for coding the absolute value of the nextcoefficient value L is determined depending on the table number of thecurrent probability table and the absolute value of the currentcoefficient value L. The probability tables shall be switched only inone direction, and once the absolute value of a coefficient value Lexceeds a predetermined value, the same probability table is used fromthen on for performing arithmetic coding.

When scanning is applied from the high-frequency domain first and thento the low-frequency domain, it is likely that the absolute values ofthe coefficient values L become larger in such order, since the absolutevalues of coefficient values L are generally larger toward thelow-frequency domain. Therefore, once the absolute value of acoefficient value L exceeds a predetermined value, even if the absolutevalue of another coefficient value L becomes smaller than suchpredetermined value after that, it is highly possible that only theabsolute value of such coefficient value is small. Thus, by performingarithmetic coding by the use of the same probability table, update of aprobability table becomes more easily adaptive to inputs. Thisconsequently makes it possible for the occurrence probability of symbols(“0” or “1” in binary data) in each probability table to be more biased(i.e. the occurrence probability of either “0” or “1” becomes a valuecloser to 1.0). Arithmetic coding has a characteristic that the morebiased probability values in a probability table are, the higher thecoding efficiency becomes. Accordingly, the use of the variable lengthcoding method according to the present invention results in an improvedcoding efficiency.

(Variation)

Next, an explanation is give of a variation of the picture codingapparatus according to the present embodiment.

First, the variation is explained concerning the switching ofprobability tables.

An arithmetic coding unit in the picture coding apparatus according tothis variation performs arithmetic coding on the absolute values ofcoefficient values L (binarized one) by switching between the twoprobability tables 1 and 4 for use.

FIG. 9 is a transition diagram showing a method of switching between theprobability tables used by the arithmetic coding unit according to thevariation.

As shown in FIG. 9, the arithmetic coding unit uses two probabilitytables, and uses the probability table 1 to perform arithmetic coding onthe absolute value of the first coefficient value L. Then, thearithmetic coding unit switches from the probability table 1 to theprobability table 4 when the absolute value of the previous coefficientvalue L exceeds “1”, and uses the probability table 4 to performarithmetic coding on the absolute values of all the subsequentcoefficient values L to be coded. In other words, the arithmetic codingunit uses the probability table 1 to perform arithmetic coding on theabsolute value of a coefficient value L to be coded when there is nocoefficient value L with an absolute value exceeding “1” inarithmetic-coded coefficient values L. On the other hand, the arithmeticcoding unit switches from the probability table 1 to the probabilitytable 4 when there exists, in arithmetic-coded coefficient values L, acoefficient value L with an absolute value exceeding “1”, i.e. when thenumber of coefficient values L with an absolute value exceeding “1”becomes a value other than zero, so as to perform arithmetic coding onthe absolute values of all the subsequent coefficient values L to becoded using the probability table 4.

Here, an explanation is given below of an example of switching betweenthe probability tables in a case where coefficient values L are “−1, 1,−2, 3, 4, 4, 1” starting from the high-frequency domain down to thelow-frequency domain. The arithmetic coding unit uses the probabilitytable 1 for the absolute value of the first coefficient value L (−1).Here, since the absolute value of such coefficient value L is “1” whichdoes not exceed a threshold value “1”, the arithmetic coding unit doesnot switch the probability table to be used to another one, andcontinues to use the probability table 1. Accordingly, the arithmeticcoding unit uses the probability table 1 to perform arithmetic coding onthe absolute value of the second coefficient value L (1). Here, sincethe absolute value of such coefficient value L is “1”, the arithmeticcoding unit does not switch the probability table to be used to anotherone, and continues to use the probability table 1, as in the above case.Accordingly, the arithmetic coding unit uses the probability table 1 toperform arithmetic coding on the absolute value of the third coefficientvalue L (−2). Here, since the absolute value is “2” which exceeds thethreshold value “1”, the arithmetic coding unit switches from theprobability table 1 to the probability table 4, and uses the probabilitytable 4 to perform arithmetic coding on the absolute value of the fourthcoefficient value L (3). Regarding the absolute value of the fifthcoefficient value L and thereafter, since there is a coefficient value Lwith an absolute value exceeding “1” in the arithmetic-coded coefficientvalues L, the arithmetic coding unit uses the probability table 4 toperform coding on the absolute value of the fifth coefficient value Land thereafter.

As is obvious from FIG. 1, binary data is represented only as “1” whenthe absolute value of a coefficient value L is “1”. Therefore, when “1”is set as a threshold value, adaptations are made to the probabilitytable 1, which is used when such threshold value is not exceeded, sothat a symbol (binary data) “1” occurs with a high probability.Accordingly, there will be a significant difference in the occurrenceprobabilities in the probability table 1, leading to a further improvedcoding efficiency.

Next, an explanation is given for the case where a plurality ofprobability tables are used for the absolute value of each coefficientvalue L (binarized one).

FIG. 10 is an explanation diagram showing the case where two probabilitytables are used for the absolute value of each coefficient value L.

For example, as shown in FIG. 10, the arithmetic coding unit switchesbetween four probability tables 1˜4 so as to use one of these to performarithmetic coding on the first bit of the absolute value of eachcoefficient value L represented as binary data, whereas it switchesbetween four probability tables 1′˜4′ different from the aboveprobability tables 1˜4 so as to used it to perform arithmetic coding onthe second bit and each of the subsequent bits. Here, the probabilitytable 1′ corresponds to the probability table 1, the probability table2′ corresponds to the probability table 2, the probability table 3′corresponds to the probability table 3, and the probability table 4′corresponds to the probability table 4. In other words, as in the caseof the preferred embodiment explained with reference to FIG. 7, aprobability table to be used is changed depending on the maximum valueof the absolute values of the coded coefficients until the previous one,but in so doing, a probability table used to code the first bit and theprobability tables used to code the second bit and thereafter arechanged at the same time.

Assume that the same threshold value and the numbers of the probabilitytables corresponding to such threshold value as those used for thepreferred embodiment explained with reference to FIG. 7 are used. Unlikethe case where all bits are coded using the same probability table, inthe probability tables 1 and 2, a probability at which “1” is morelikely to occur is set high (in order to adapt to inputs), and in theprobability tables 3 and 4, a probability at which “0” is more likely tooccur is set high. Similarly, regarding the probability tables 1′˜4′, inthe probability tables 1′˜3′, a probability at which “1” is more likelyto occur is set high (in order to adapt to inputs), and in theprobability table 4, a probability at which “0” is more likely to occuris set high. In arithmetic coding, the bigger a difference in theoccurrence probabilities of symbols (“0” or “1” in binary data) storedin probability tables (i.e. the closer the occurrence probability ofeither “0” or “1” is to 1.0), the higher the coding efficiency becomes.This consequently leads to a further improved coding efficiency. In thiscase, in addition to dividing binary data into the first bit and thebits thereafter, binary data may also be divided at another bitposition, and may be divided into three or more by bit positions.Moreover, instead of using the same number of probability tables foreach of the divided bit positions, it is also possible, for example,that a plurality of probability tables are used for the first bit andthe same probability table is used for the second bit and the subsequentbits (i.e. the same probability table is used regardless ofcoefficients). When a same number of probability tables are used foreach of the divided bit positions as in the case of the aforementionedembodiment, they may be switched between them according to a differentreference (threshold value) (i.e. at a different timing), instead ofbeing switched according to the same reference.

The picture coding apparatus according to the present invention has beenexplained using the above embodiment and variation, but the presentinvention is not limited to them.

In the present embodiment and variation, for example, an explanation isprovided for the case where a picture is coded by means of intra picturecoding, but the same effect can be achieved also for the case where apicture is coded by means of inter picture coding by performing motioncompensation and others on an input moving picture.

Furthermore, in the present embodiment and variation, although anexplanation is given for the case where an input picture is divided intopixel blocks of 4×4 pixels in horizontal and vertical directions, apixel block may be with a different size.

Also, in the present embodiment and variation, although FIG. 5B is usedto explain a method of performing scanning within a coefficient block,another scanning order may also be employed as long as scanning isperformed from the low-frequency domain toward the high-frequencydomain.

Moreover, in the present embodiment and variation, an explanation isgiven for the case where the RL sequence generation unit 201 convertsquantized frequency coefficients into one-dimensional coefficients usinga predetermined scanning method, and generates a sequence (RL sequence)made up of combinations of a number R indicating a run of zerocoefficient values and a non-zero coefficient value L subsequent to it,but a sequence of numbers R and coefficient values L may be generatedseparately. When a sequence of coefficient values L is generated, forexample, the reordering unit 202 may be omitted, if such sequence isgenerated by performing scanning starting from the high-frequency domainto the low-frequency domain and by selecting coefficients withcoefficient values other than zero.

Furthermore, an explanation is given in the present embodiment for thecase where four probability tables are used and such probability tablesare switched according to the transition table illustrated in FIG. 7,and an explanation is given in the variation for the case where twoprobability tables are used and such probability tables are switchedaccording to the transition table illustrated in FIG. 9, but differentvalues may be employed as the number of probability tables and as athreshold value for the absolute values of coefficient values L whenprobability tables are switched as illustrated in FIGS. 7 and 9.

Also, FIG. 1 is presented as an example of a binary table, but anothertable may be employed.

Furthermore, in the present embodiment and variation, although anexplanation is given for the case where the arithmetic coding unitperforms binary arithmetic coding, mufti-value arithmetic coding may beperformed instead. In such case, it is possible to omit the binarizationunit 203.

(Second Embodiment)

The following explains a picture decoding apparatus according to thesecond embodiment of the present invention with reference to thefigures.

FIG. 11 is a block diagram showing the configuration of a picturedecoding apparatus 600 according to the second embodiment of the presentinvention.

This picture decoding apparatus 600 performs intra picture decoding on abit stream resulted from performing intra picture coding on picturedata, and is comprised of a variable length decoding unit 601, aninverse quantization unit 602, an inverse frequency transformation unit603, and a picture memory 604. The bit stream to be inputted here isgenerated using the variable length coding method employed by thepicture coding apparatus 100 according to the first embodiment, and isfirst obtained by the variable length decoding unit 601.

On the receipt of the bit stream, the variable length decoding unit 601generates a coefficient block made up of a plurality of coefficients asshown in FIG. 5A by performing variable length decoding on such bitstream.

The inverse quantization unit 602, when receiving the coefficient blockfrom the variable length decoding unit 601, performs inversequantization on such coefficient block. Inverse quantization here meansto integrate a predetermined quantization value to each coefficient inthe coefficient block. Generally, a quantization value varies on acoefficient block or a frequency band basis, and is obtained from a bitstream. Subsequently, the inverse quantization unit 602 outputs theinverse-quantized coefficient block to the inverse frequencytransformation unit 603.

The inverse frequency transformation unit 603 performs inverse frequencytransformation on the inverse-quantized coefficient block, and convertsthe coefficient block into a pixel block. Then, the inverse frequencytransformation unit 603 outputs such converted pixel block to thepicture memory 604.

The picture memory 604 stores decoded pixel blocks in sequence, and whenpixel blocks equivalent to a picture are stored, it outputs these pixelblocks as an output picture.

Here, a detailed explanation is given of the variable length decodingunit 601 described above.

FIG. 12 is a block diagram showing an internal configuration of thevariable length decoding unit 601.

As FIG. 12 shows, the variable length decoding unit 601 is comprised ofan arithmetic decoding unit 701, a mufti-value conversion unit 702, atable storage unit 703, a reordering unit 704, and a coefficientgeneration unit 705.

The table storage unit 703 stores four probability tables 1˜4 as shownin FIG. 8, for example.

On the receipt of the bit stream, the arithmetic decoding unit 701 firstperforms arithmetic decoding on such bit stream. Here, an explanation isgiven of binary arithmetic decoding to be performed on the absolutevalues (binarized one) of coded coefficient values L included in the bitstream.

When performing arithmetic decoding on the absolute value of a codedcoefficient value L, the arithmetic decoding unit 701 obtains, from themufti-value conversion unit 702, the absolute value of the previouscoefficient value L which has already been decoded and converted into amufti-value. Then, the arithmetic decoding unit 701 switches between theprobability tables 1˜4 stored by the table storage unit 703 in a manneras shown in FIG. 7 depending on the absolute value of such coefficientvalue L, and performs binary arithmetic decoding on the absolute valueof each of coded coefficient values L so as to output binary datacorresponding to each of them.

The mufti-value conversion unit 702 converts the binary data outputtedby the arithmetic decoding unit 701 into mufti-values, using, forexample, a binary table as shown in FIG. 1, so as to represent them asthe absolutes value of coefficient values L. Then, the mufti-valueconversion unit 702 outputs the absolute values of such coefficientvalues L to the arithmetic decoding unit 701 and the reordering unit704.

An explanation is given of a detailed operation of the arithmeticdecoding unit 701 and the mufti-value conversion unit 702.

First, the arithmetic decoding unit 701 uses the probability table 1 toperform arithmetic decoding on the absolute value of the first codedcoefficient value L. Then, the arithmetic decoding unit 701 outputs, tothe mufti-value conversion unit 702, binary data obtained by performingarithmetic decoding. The mufti-value conversion unit 702 uses the binarytable so as to convert the binary data into the absolute value of thecoefficient value L, and outputs such absolute value to the arithmeticdecoding unit 701 and the reordering unit 704.

Then, for the absolute values of the subsequent coded coefficient valuesL, the arithmetic decoding unit 701 switches the probability table to beused to another one, depending on the table number of the probabilitytable used when the absolute value of the previous coded coefficientvalue L is binary arithmetic decoded as well as on the absolute value ofsuch previous coefficient value L obtained from the mufti-valueconversion unit 702. As shown in FIG. 7, the probability table 2 is usedwhen one of the following is satisfied: when the probability table 1 wasused to perform arithmetic decoding on the absolute value of theprevious coded coefficient value L and the absolute value of theprevious coefficient value L obtained form the mufti-value conversionunit 702 is “1”; and when the probability table 2 was used to performarithmetic decoding on the absolute value of the previous codedcoefficient value L and the absolute value of the previous coefficientvalue L obtained form the mufti-value conversion unit 702 is “1”. Theprobability table 3 is used when one of the following is satisfied: whenthe probability table 1 was used to perform arithmetic decoding on theabsolute value of the previous coded coefficient value L and theabsolute value of the previous coefficient value L obtained form themufti-value conversion unit 702 is “2”; when the probability table 2 wasused to perform arithmetic decoding on the absolute value of theprevious coded coefficient value L and the absolute value of theprevious coefficient value L obtained form the mufti-value conversionunit 702 is “2”; and when the probability table 3 was used to performarithmetic decoding on the absolute value of the previous codedcoefficient value L and the absolute value of the previous coefficientvalue L obtained form the mufti-value conversion unit 702 is “2 orsmaller”. And the probability table 4 is used when one of the followingis satisfied: when the absolute value of the previous coefficient valueL obtained form the mufti-value conversion unit 702 is “3 or a largervalue”; and when the probability table 4 was used to perform arithmeticdecoding on the absolute value of the previous coded coefficient valueL. As shown above, the probability tables 1˜4 are switched in onedirection, that is, from a probability table with a smaller table numberto a probability table with a larger table number. Accordingly, even ifthe absolute value of the previous coefficient value L obtained from themufti-value conversion unit 702 is equal to or smaller than apredetermined threshold value, the probability tables shall not beswitched in the opposite direction. This is the point that distinguishesthe present invention from the existing technique.

The following explains an example of switching between the probabilitytables, in a case where decoding is performed into the absolute valuesof coefficient values L shown in FIG. 6C.

The arithmetic decoding unit 701 uses the probability table 1 to performarithmetic decoding on the absolute value of the first coded coefficientvalue L (−2) so as to decode it into binary data “01”. Since thearithmetic decoding unit 701 obtains, from the mufti-value conversionunit 702, “2” which is a mufti-value converted from such binary data“01”, it switches from the probability table 1 to the probability table3 so as to use it. Accordingly, the arithmetic decoding unit 701 usesthe probability table 3 to perform arithmetic decoding on the absolutevalue of the second coded coefficient value L (3) so as to decode itinto binary data “001”. Here, since the arithmetic decoding unit 701obtains, from the mufti-value conversion unit 702, “3” which is amufti-value converted from such binary data “001”, it switches from theprobability table 3 to the probability table 4 so as to use it.Accordingly, the arithmetic decoding unit 701 uses the probability table4 to perform arithmetic decoding on the absolute value of the thirdcoded coefficient value L (6) so as to decode it into binary data“000001”. Here, since the probability table to be used is switched tothe probability table 4, the arithmetic decoding unit 701 uses theprobability table 4 to perform arithmetic decoding on the absolutevalues of all the subsequent coded coefficient values L. For example,the absolute value of the fifth coded coefficient value L is decoded andconverted into a mufti-value “2”, but unlike the existing technique, thearithmetic decoding unit 701 uses the probability table 4 to performarithmetic decoding on the absolute value of the sixth coded coefficientvalue L and thereafter, without switching to another probability table.

Through the above operation, when the absolute values of coefficientvalues L, the numbers R, and the signs of the coefficient values Lequivalent to one coefficient block are generated, they are inputted tothe reordering unit 704 as an RL sequence.

The reordering unit 704 sorts such inputted RL sequence in reverseorder. However, the number of coefficients shall not be reordered. FIG.6A illustrates a reordered RL sequence. Subsequently, the reorderingunit 704 outputs, to the coefficient generation unit 705, such RLsequence reordered in the above manner.

The coefficient generation unit 705 converts the inputted RL sequenceinto a coefficient block. In so doing, the coefficient generation unit705 makes a conversion from the RL sequence into a coefficient block byrepeatedly carrying out the following operation: generates a coefficientwith the value “0” only by the number indicated by a number R and thengenerates a coefficient with a value indicated by a coefficient value L.Here, the coefficient generation unit 705 performs zig-zag scanningstarting from the low-frequency domain toward the high-frequency domain,so as to convert the RL sequence shown in FIG. 6A into the coefficientblock shown in FIG. 5A. Then, the coefficient generation unit 705outputs, to the inverse quantization unit 602, the coefficient blockgenerated in the above manner.

As described above, in the arithmetic decoding method employed by thevariable length decoding unit 601 in the picture decoding apparatus 600according to the present invention, a plurality of probability tablesare switched when arithmetic decoding is performed on the absolutevalues of coefficient values L included in an input bit stream. Whenswitching to another probability table, which probability table to beused when decoding the absolute value of the next coefficient value L isdetermined depending on the table number of the current probabilitytable and on the absolute value of a coefficient value L resulted fromdecoding. When this is done, probability tables are switched only in onedirection, and when the absolute value of a coefficient value L resultedfrom decoding exceeds a predetermined value, the same probability tableis used to perform arithmetic decoding on all the subsequent absolutevalues.

As is obvious from the above, the use of the arithmetic decoding methodaccording to the present invention makes it possible to properly decodea bit stream coded by the use of the variable length coding methodaccording to the present invention.

(Variation)

Next, an explanation is given of a variation of the arithmetic decodingunit in the picture decoding apparatus according to the presentembodiment.

First, the variation is explained concerning the switching ofprobability tables.

An arithmetic decoding unit in the picture decoding apparatus accordingto this variation performs binary arithmetic decoding on the absolutevalues of coefficient value L (binarized one) which have been coded byswitching between the two probability tables 1 and 4 for use.

As shown in FIG. 9, this arithmetic decoding unit uses two probabilitytables, and uses the probability table 1 to perform arithmetic decodingon the absolute value of the first coded coefficient value L. Then, thearithmetic decoding unit switches from the probability table 1 to theprobability table 4 when the absolute value of the previous coefficientvalue L exceeds “1”, and uses the probability table 4 to performarithmetic decoding on the absolute values of all the subsequentcoefficient values L to be decoded. In other words, the arithmeticdecoding unit uses the probability table 1 to perform arithmeticdecoding on the absolute value of a coded coefficient value L to bedecoded when there is no coefficient value L with an absolute valueexceeding “1” in coefficient values L which have been decoded andconverted into mufti values. On the other hand, the arithmetic decodingunit switches from the probability table 1 to the probability table 4when there exists, in coefficient values L which have been decoded andconverted into mufti values, a coefficient value L with an absolutevalue exceeding “1”, i.e. when the number of coefficient values L withan absolute value exceeding “1” becomes a value other than zero, andswitches from the probability table 1 to the probability table 4, so asto perform arithmetic decoding on the absolute values of all thesubsequent coefficient values L to be decoded using the probabilitytable 4.

Here, an explanation is given below of an example of switching betweenthe probability tables in a case where coefficient values L are “−1, 1,−2, 3, 4, 4, 1” starting from the high-frequency domain down to thelow-frequency domain. The arithmetic decoding unit uses the probabilitytable 1 to perform arithmetic decoding on the absolute value of thefirst coded coefficient value L so as to convert it into binary data“1”. Here, since the arithmetic decoding unit obtains, from themufti-value conversion unit 702, “1” which is a mufti value convertedfrom such binary data “1”, and judges that the absolute value of suchcoefficient value L is “1” which does not exceed a threshold value “1”,it does not switch the probability table to be used, and continues touse the probability table 1. Accordingly, the arithmetic decoding unitperforms arithmetic decoding on the absolute value of the second codedcoefficient value L so as to convert it into binary data “1”, using theprobability table 1. Here, since the arithmetic decoding unit judgesthat the absolute value of such coefficient value L is “1” which doesnot exceed the threshold value “1”, it does not switch the probabilitytable to be used, and continues to use the probability table 1, as inthe above case. Accordingly, the arithmetic decoding unit performsarithmetic coding on the absolute value of the third coded coefficientvalue L so as to convert it into binary data “01”, using the probabilitytable 1. Here, the arithmetic decoding unit obtains, from themufti-value conversion unit 702, “2” which is a mufti value convertedfrom such binary data “01”, and judges that the absolute value is “2”which exceeds the absolute value “1”, it switches from the probabilitytable 1 to the probability table 4, and uses the probability table 4 toperform arithmetic decoding on the absolute value of the fourth codedcoefficient value L so as to convert it into binary data “0001”.Regarding the absolute value of the fifth coded coefficient value L andthe absolute values of its subsequent coded coefficient values, sincethere is a coefficient value L with an absolute value exceeding “1” incoefficient values which have been decoded and converted into muftivalues, the arithmetic decoding unit performs arithmetic decoding on theabsolute value of the fifth coded coefficient value L and the absolutevalues of all the subsequent coded coefficient values using theprobability table 4.

Next, an explanation is given for the case where binary data derivedfrom the absolute value of a coded coefficient value L included in a bitstream is made up of a plurality to elements, and a differentprobability table is used on an element-by-element basis when binaryarithmetic decoding is performed on binary data of the absolute value ofsuch coded coefficient value L.

For example, when binary data of the absolute value of a codedcoefficient value L is made up of two elements, the arithmetic codingunit, as shown in FIG. 10, performs arithmetic decoding on one of thetwo elements in the coded binary data so as to convert it into a numericvalue corresponding to the first bit of the binary data, by switchingbetween the four probability tables 1˜4 for use. Then, the arithmeticdecoding unit performs arithmetic decoding on the other element in thebinary data so as to convert it into a numeric value corresponding tothe second bit and each of its subsequent bit in the binary data, byswitching between the four probability tables 1′˜4′ for use which aredifferent from the above four probability tables 1˜4.

Here, the probability table 1′ corresponds to the probability table 1,the probability table 2′ corresponds to the probability table 2, theprobability table 3′ corresponds to the probability table 3, and theprobability table 4′ corresponds to the probability table 4. In otherwords, as in the case of the preferred embodiment explained withreference to FIG. 7, a probability table to be used is changed dependingon the maximum value of the absolute values of the coded coefficientsuntil the previous one, but in so doing, a probability table used tocode the first bit and the probability tables used to code the secondbit and thereafter are changed at the same time.

Assume that the same threshold value and the numbers of the probabilitytables corresponding to such threshold value as those used for thepreferred embodiment explained with reference to FIG. 7 is used. In thiscase, unlike the case where all bits are coded using the sameprobability table, in the probability tables 1 and 2, a probability atwhich “1” is more likely to occur is set high (in order to adapt toinputs), and in the probability tables 3 and 4, a probability at which“0” is more likely to occur is set high. Similarly, regarding theprobability tables 1′˜4′, in the probability tables 1′˜3′, a probabilityat which “1” is more likely to occur is set high (in order to adapt toinputs), and in the probability tables 4′, a probability at which “0” ismore likely to occur is set high.

In this case, in addition to dividing binary data into the first bit andthe bits thereafter, binary data may also be divided at another bitposition, and may be divided into three or more by bit positions.Moreover, instead of using the same number of probability tables foreach of the divided bit positions, it is also possible, for example,that a plurality of probability tables are used for the first bit andthe same probability table is used for the second bit and the subsequentbits (i.e. the same probability table is used regardless ofcoefficients). When a same number of probability tables are used foreach of the divided bit positions as in the case of the aforementionedembodiment, they may be switched between them according to a differentreference (threshold value).

The picture decoding apparatus according to the present invention hasbeen explained in the above using the present embodiment and variation,but the present invention is not limited to them.

In the present embodiment and variation, for example, an explanation isprovided for the case where decoding is performed on a bit stream whichhas been generated by means of intra picture coding, but the same effectcan be achieved also for the case where decoding is performed on a bitstream which has been generated by means of inter picture coding byperforming motion compensation and others on an input moving picture.

Furthermore, in the present embodiment and variation, although anexplanation is given for the case where a bit stream in which picturedata is coded being divided into pixel blocks of 4×4 pixels inhorizontal and vertical directions, a pixel block may have a differentsize.

Moreover, an explanation is given in the present embodiment for the casewhere four probability tables are used and switched according to thetransition table illustrated in FIG. 7, and an explanation is given inthe variation for the case where two probability tables are used andswitched according to the transition table illustrated in FIG. 9, butdifferent values may be employed as the number of probability tables anda threshold value for the absolute values of coefficient values L whenprobability tables are switched as illustrated in FIGS. 7 and 9.

Also in the present embodiment and variation, although FIG. 5B is usedto explain a method of performing scanning within a coefficient block,another scanning order may also be employed as long as it is the same asthe scanning method employed at the time of coding.

Furthermore, FIG. 1 is presented as an example of a binary table, butanother table may be employed as long as it is the same as the binarytable used at the time of coding.

Moreover, although an explanation is given in the present embodiment andvariation for the case where the arithmetic decoding unit 701 performsbinary arithmetic decoding, mufti-value arithmetic decoding may beperformed instead. In such case, it is possible to omit the mufti-valueconversion unit 702.

(The Third Embodiment)

If a program for realizing the variable length coding method or thevariable length decoding method as shown in each of the aforementionedembodiments is recorded on a recording medium such as a flexible disk,it becomes possible to easily perform the processing presented in eachof the above embodiments in an independent computer system.

FIGS. 13A, 13B, and 13C are diagrams explaining a recording medium thatstores a program for realizing the variable length coding method and thevariable length decoding method carried out by the picture codingapparatus 100 and the picture decoding apparatus 600 according to thefirst and second embodiments.

FIG. 13B shows an external view of a flexible disk FD viewed from thefront, a schematic cross-sectional view and a disk body FD1, while FIG.13A illustrates an example physical format of the disk body FD1 as arecording medium itself.

The disk body FD1 is contained in a case F, and a plurality of tracks Trare formed concentrically on the surface of the disk body FD1 in theradius direction from the periphery, each track being divided into 16sectors Se in the angular direction. Therefore, in the flexible disk FDstoring the above-mentioned program, the variable length coding methodor the variable length decoding method as such program is recorded in anarea allocated for it on the disk body FD1.

FIG. 13C shows the structure for recording and reading out the programon and from the flexible disk FD.

When the program is recorded on the flexible disk FD, the variablelength coding method or the variable length decoding method as the aboveprogram is written by the use of the computer system Cs via a flexibledisk drive FDD. Meanwhile, when the variable length coding method or thevariable length decoding method is constructed in the computer system Csthrough the program on the flexible disk FD, the program is read outfrom the flexible disk FD via the flexible disk drive FDD andtransferred to the computer system Cs.

The above explanation is made on the assumption that a recording mediumis a flexible disk FD, but an optical disc may also be used. Inaddition, the recording medium is not limited to this, and any othermedium such as an IC card and a ROM cassette capable of recording aprogram can also be used.

(Fourth Embodiment)

The following explains applications of the variable length coding methodand the variable length decoding method as shown in the aboveembodiments as well as a system using them.

FIG. 14 is a block diagram showing an overall configuration of a contentsupply system ex100 for realizing a content distribution service. Thearea for providing a communication service is divided into cells ofdesired size, and base stations ex107˜ex110, which are fixed wirelessstations, are placed in respective cells.

In this content supply system ex100, devices such as a computer ex111, aPDA (Personal Digital Assistant) ex112, a camera ex113, a cellular phoneex114, and a camera-equipped cellular phone ex115 are respectivelyconnected to the Internet ex101 via an Internet service provider ex102,a telephone network ex104, and the base stations ex107˜ex110.

However, the content supply system ex100 is not limited to thecombination as shown in FIG. 14, and may be connected to a combinationof any of them. Also, each of the devices may be connected directly tothe telephone network ex104, not via the base stations ex107˜ex110,which are fixed wireless stations.

The camera ex113 is a device such as a digital video camera capable ofshooting moving pictures. The cellular phone may be a cellular phone ofa PDC (Personal Digital Communication) system, a CDMA (Code DivisionMultiple Access) system, a W-CDMA (Wideband-Code Division MultipleAccess) system or a GSM (Global System for Mobile Communications)system, a PHS (Personal Handyphone system) or the like, and may be anyone of these.

Furthermore, a streaming server ex103 is connected to the camera ex113via the base station ex109 and the telephone network ex104, whichenables live distribution or the like based on coded data transmitted bythe user using the camera ex113. Either the camera ex113 or a server andthe like capable of data transmission processing may code the shot data.Also, moving picture data shot by a camera ex116 may be transmitted tothe streaming server ex103 via the computer ex111. The camera ex116 is adevice such as a digital camera capable of shooting still pictures andmoving pictures. In this case, either the camera ex116 or the computerex111 may code the moving picture data. An LSI ex117 included in thecomputer ex111 or the camera ex116 performs coding processing. Note thatsoftware for coding and decoding pictures may be integrated into acertain type of storage medium (such as a CD-ROM, a flexible disk and ahard disk) that is a recording medium readable by the computer ex111 andthe like. Furthermore, the camera-equipped cellular phone ex115 maytransmit the moving picture data. This moving picture data is data codedby an LSI included in the cellular phone ex115.

In the content supply system ex100, content (e.g. a music live video)which has been shot by the user using the camera ex113, the camera ex116or the like is coded in the same manner as the above-describedembodiments and transmitted to the streaming server ex103, and thestreaming server ex103 makes stream distribution of the content data toclients at their request. The clients include the computer ex111, thePDA ex112, the camera ex113, the cellular phone ex114 and so forthcapable of decoding the above coded data. The content supply systemex100 with the above structure is a system that enables the clients toreceive and reproduce the coded data and realizes personal broadcastingby allowing them to receive, decode and reproduce the data in real time.

The picture coding apparatus and the picture decoding apparatuspresented in the above embodiments can be used for coding and decodingto be performed in each of the devices making up the above system.

An explanation is given of a cellular phone as an example.

FIG. 15 is a diagram showing an example of the cellular phone ex115 thatemploys the variable length coding and the variable length decodingexplained in the above embodiments. The cellular phone ex115 has anantenna ex201 for transmitting/receiving radio waves to and from thebase station ex110 via radio waves, a camera unit ex203 such as a CCDcamera capable of shooting video and still pictures, a display unitex202 such as a liquid crystal display for displaying the data obtainedby decoding video and the like shot by the camera unit ex203 and videoand the like received by the antenna ex201, a main body including a setof operation keys ex204, a voice output unit ex208 such as a speaker foroutputting voices, a voice input unit ex205 such as a microphone forinputting voices, a recording medium ex207 for storing coded data ordecoded data such as data of moving or still pictures shot by thecamera, data of received e-mails and moving picture data or stillpicture data, and a slot unit ex206 for enabling the recording mediumex207 to be attached to the cellular phone ex115. The recording mediumex207 is embodied as a flash memory element, a kind of EEPROM(Electrically Erasable and Programmable Read Only Memory) that is anelectrically erasable and rewritable nonvolatile memory, stored in aplastic case such as an SD card.

Next, referring to FIG. 16, an explanation is given of the cellularphone ex115. In the cellular phone ex115, a main control unit ex311 forcentrally controlling the display unit ex202 and each unit of the mainbody having the operation keys ex204 is configured in a manner in whicha power supply circuit unit ex310, an operation input control unitex304, a picture coding unit ex312, a camera interface unit ex303, anLCD (Liquid Crystal Display) control unit ex302, a picture decoding unitex309, a multiplexing/demultiplexing unit ex308, a recording/reproducingunit ex307, a modem circuit unit ex306, and a voice processing unitex305 are interconnected via a synchronous bus ex313.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex310 supplies each unit with power from abattery pack, so as to activate the camera-equipped digital cellularphone ex115 to make it into a ready state.

In the cellular phone ex115, the voice processing unit ex305 converts avoice signal received by the voice input unit ex205 in conversation modeinto digital voice data under the control of the main control unit ex311comprised of a CPU, a ROM, a RAM and others, the modem circuit unitex306 performs spread spectrum processing on it, and a transmit/receivecircuit unit ex301 performs digital-to-analog conversion processing andfrequency transformation processing on the data, so as to transmit theresultant via the antenna ex201. Also, in the cellular phone ex115, areceived signal received by the antenna ex201 in conversation mode isamplified and performed of frequency transformation processing andanalog-to-digital conversion processing, the modem circuit unit ex306performs inverse spread spectrum processing on the resultant, and thevoice processing unit ex305 converts it into an analog voice signal, soas to output it via the voice output unit ex208.

Furthermore, when sending an e-mail in data communication mode, textdata of the e-mail inputted by operating the operation keys ex204 on themain body is sent out to the main control unit ex311 via the operationinput control unit ex304. In the main control unit ex311, after themodem circuit unit ex306 performs spread spectrum processing on the textdata and the transmit/receive circuit unit ex301 performsdigital-to-analog conversion processing and frequency transformationprocessing on it, the resultant is transmitted to the base station ex110via the antenna ex201.

When picture data is transmitted in data communication mode, the picturedata shot by the camera unit ex203 is supplied to the picture codingunit ex312 via the camera interface unit ex303. When picture data is notto be transmitted, it is also possible to display such picture data shotby the camera unit ex203 directly on the display unit ex202 via thecamera interface unit ex303 and the LCD control unit ex302.

The picture coding unit ex312, which includes the picture codingapparatus according to the present invention in its configuration,performs compression coding on the picture data supplied from the cameraunit ex203 using the coding method used by the picture coding apparatuspresented in the above-mentioned embodiments, so as to convert it intocoded picture data, and sends it out to the multiplexing/demultiplexingunit ex308. At this time, the cellular phone ex115 sends voices receivedby the voice input unit ex205 while the shooting by the camera unitex203 is taking place, to the multiplexing/demultiplexing unit ex308 asdigital voice data via the voice processing unit ex305.

The multiplexing/demultiplexing unit ex308 multiplexes the coded picturedata supplied from the picture coding unit ex312 and the voice datasupplied from the voice processing unit ex305 using a predeterminedmethod, the modem circuit unit ex306 performs spread spectrum processingon the resulting multiplexed data, and the transmit/receive circuit unitex301 performs digital-to-analog conversion processing and frequencytransformation processing on the resultant, so as to transmit theprocessed data via the antenna ex201.

When receiving, in data communication mode, data included in a movingpicture file which is linked to a Web page or the like, the modemcircuit unit ex306 performs inverse spread spectrum processing on thereceived signal received from the base station ex110 via the antennaex201, and sends out the resulting multiplexed data to themultiplexing/demultiplexing unit ex308.

In order to decode the multiplexed data received via the antenna ex201,the multiplexing/demultiplexing unit ex308 separates the multiplexeddata into a coded bit stream of picture data and a coded bit stream ofvoice data, and supplies such coded picture data to the picture decodingunit ex309 and such voice data to the voice processing unit ex305 viathe synchronous bus ex313.

Next, the picture decoding unit ex309, which includes the picturedecoding apparatus according to the present invention in itsconfiguration, decodes the coded bit stream of the picture data usingthe decoding method paired with the coding method as shown in theabove-mentioned embodiments so as to generate moving picture data forreproduction, and supplies such data to the display unit ex202 via theLCD control unit ex302. Accordingly, moving picture data included in themoving picture file linked to a Web page, for instance, is displayed. Atthe same time, the voice processing unit ex305 converts the voice datainto an analog voice signal, and then supplies this signal to the voiceoutput unit ex208. Accordingly, voice data included in the movingpicture file linked to a Web page, for instance, is reproduced.

Note that the aforementioned system is not an exclusive example andtherefore that at least either the picture coding apparatus or thepicture decoding apparatus of the above embodiments can be incorporatedinto a digital broadcasting system as shown in FIG. 17, against thebackdrop that satellite/terrestrial digital broadcasting has been arecent topic of conversation. To be more specific, at a broadcastingstation ex409, a coded bit stream of video information is transmitted,by radio waves, to a satellite ex410 for communications or broadcasting.Upon receipt of it, the broadcast satellite ex410 transmits radio wavesfor broadcasting, an antenna ex406 of a house equipped with satellitebroadcasting reception facilities receives such radio waves, and anapparatus such as a television (receiver) ex401 and a set top box (STP)ex407 decodes the coded bit stream and reproduces the decoded data. Thepicture decoding apparatus as shown in the above-mentioned embodimentscan be implemented in the reproduction apparatus ex403 for reading anddecoding the coded bit stream recorded on a storage medium ex402 that isa recording medium such as a CD and a DVD. In this case, a reproducedvideo signal is displayed on a monitor ex404. It is also conceived thatthe picture decoding apparatus is implemented in the set top box ex407connected to a cable ex405 for cable television or the antenna ex406 forsatellite/ground-based broadcasting so as to reproduce it on atelevision monitor ex408. In this case, the picture decoding apparatusmay be incorporated into the television, not in the set top box. Or, acar ex412 with an antenna ex411 can receive a signal from the satelliteex410, the base station ex107 or the like, so as to reproduce a movingpicture on a display device such as a car navigation system ex413mounted on the car ex412.

Furthermore, it is also possible to code a picture signal by the movingpicture coding apparatus presented in the above embodiments and torecord the resultant in a recording medium. Examples include a DVDrecorder for recording a picture signal on a DVD disc ex421 and arecorder ex420 such as a disc recorder for recording a picture signal ona hard disk. Moreover, a picture signal can be recorded in an SD cardex422. If the recorder ex420 is equipped with the moving picturedecoding apparatus presented in the above embodiments, it is possible toreproduce a picture signal recorded on the DVD disc ex421 or in the SDcard ex422, and display it on the monitor ex408.

As the configuration of the car navigation system ex413, theconfiguration without the camera unit ex203 and the camera interfaceunit ex303, out of the configuration shown in FIG. 16, is conceivable.The same is applicable to the computer ex111, the television ex401(receiver) and the like.

Concerning the terminals such as the cellular phone ex114, atransmitting/receiving terminal having both an encoder and a decoder, aswell as a transmitting terminal only with an encoder and a receivingterminal only with a decoder are possible as forms of implementation.

As stated above, it is possible to employ the variable length codingmethod and the variable length decoding method presented in the aboveembodiments into any one of the above-described devices and systems.Accordingly, it becomes possible to achieve an effect explained in theaforementioned embodiments.

From the invention thus described, it will be obvious that theembodiments of the invention may be varied in many ways. Such variationsare not to be regarded as a departure from the spirit and scope of theinvention, and all such modifications as would be obvious to one skilledin the art are intended for inclusion within the scope of the followingclaims.

INDUSTRIAL APPLICABILITY

The variable length coding method and the variable length decodingmethod according to the present invention are suited to be used in apicture coding apparatus for coding a moving picture, a picture decodingapparatus for decoding a coded moving picture, and a systemincorporating these apparatuses such as a content supply system forsupplying a digital work and other content as well as a digitalbroadcasting system.

The invention claimed is:
 1. A decoding method for arithmetic decoding,on a block basis, on coefficients of a two-dimensional array offrequency components, the coefficients being generated by frequencytransformation performed on picture data of a block which has a 4×4 sizeof pixels, the decoding method comprising: a decoding step of, for eachof non-zero coefficients of a block, (i) performing a decoding processon a sign code of the non-zero coefficient, (ii) performing firstarithmetic decoding on a first bit of binary data corresponding to anabsolute value of the non-zero coefficient, and (iii) performing secondarithmetic decoding on a bit other than the first bit of the binary datacorresponding to the absolute value of the non-zero coefficient; and acombining step of, for each of the non-zero coefficients of the block,(i) combining the first bit of the binary data and the bit other thanthe first bit of the binary data into the absolute value of the non-zerocoefficient and (ii) combining the absolute value of the non-zerocoefficient and the sign code of the non-zero coefficient into a valueof the non-zero coefficient; and a coefficient arranging step ofarranging, on a block basis, the values of the non-zero coefficientsinto the two-dimensional array of frequency components, wherein thefirst arithmetic decoding on the first bit of the binary data isperformed on a block basis according to a predetermined scanning orderstarting at a high frequency component toward a low frequency componentby switching a plurality of first probability tables, wherein the secondarithmetic decoding on a bit other than the first bit of the binary datais performed on a block basis according to the predetermined scanningorder starting at a high frequency component toward a low frequencycomponent by switching a plurality of second probability tables, whereinthe switching of the plurality of first probability tables includesswitching a first probability table to a new first probability tablebased on a result of a comparison between an absolute value of a targetnon-zero coefficient to be decoded and a predetermined threshold value,wherein the switching of the plurality of second probability tablesincludes switching a second probability table to a new secondprobability table based on a result of a comparison between an absolutevalue of a target non-zero coefficient to be decoded and thepredetermined threshold value, wherein, in the switching of the firstprobability table, the switching between the plurality of firstprobability tables is performed in one direction such that the firstprobability table, which has been used before the new first probabilitytable, is not used after switching to the new first probability table,and wherein, in the switching of the second probability table, theswitching between the plurality of second probability tables isperformed in one direction such that the second probability table, whichhas been used before the new second probability table, is not used afterswitching to the new second probability table.
 2. The decoding methodaccording to claim 1, wherein, in the switching of the first probabilitytable, the switching to the new first probability table is performedafter the number of decoded non-zero coefficients having an absolutevalue exceeding 1 becomes a non-zero value, and the switching betweenthe plurality of first probability tables is not performed after theswitching to the new first probability table.
 3. A decoding apparatuswhich performs arithmetic decoding, on a block basis, on coefficients ofa two-dimensional array of frequency components, the coefficients beinggenerated by frequency transformation performed on picture data of ablock which has a 4×4 size of pixels, the decoding apparatus comprising:a decoding unit operable to, for each of non-zero coefficients of ablock, (i) perform a decoding process on a sign code of the non-zerocoefficient, (ii) perform first arithmetic decoding on a first bit ofbinary data corresponding to an absolute value of the non-zerocoefficient, and (iii) perform second arithmetic decoding on a bit otherthan the first bit of the binary data corresponding to the absolutevalue of the non-zero coefficient; and a combining unit operable to, foreach of the non-zero coefficients of the block, (i) combine the firstbit of the binary data and the bit other than the first bit of thebinary data into the absolute value of the non-zero coefficient and (ii)combine the absolute value of the non-zero coefficient and the sign codeof the non-zero coefficient into a value of the non-zero coefficient;and a coefficient arranging unit operable to arrange, on a block basis,the values of the non-zero coefficients into the two-dimensional arrayof frequency components, wherein the first arithmetic decoding on thefirst bit of the binary data is performed on a block basis according toa predetermined scanning order starting at a high frequency componenttoward a low frequency component by switching a plurality of firstprobability tables, wherein the second arithmetic coding on a bit otherthan the first bit of the binary data is performed on a block basisaccording to the predetermined scanning order starting at a highfrequency component toward a low frequency component by switching aplurality of second probability tables, wherein the switching of theplurality of first probability tables includes switching a firstprobability table to a new first probability table based on a result ofa comparison between an absolute value of a target non-zero coefficientto be decoded and a predetermined threshold value, wherein the switchingof the plurality of second probability tables includes switching asecond probability table to a new second probability table based on aresult of a comparison between an absolute value of a target non-zerocoefficient to be decoded and the predetermined threshold value, whereinthe switching of the plurality of first probability tables includesswitching between the plurality of first probability tables in onedirection such that the first probability table, which has been usedbefore the new first probability table, is not used after switching tothe new first probability table, and wherein the switching of theplurality of second probability tables includes switching between theplurality of second probability tables in one direction such that thesecond probability table, which has been used before the new secondprobability table, is not used after switching to the new secondprobability table.